/**iframe自适应高度*/
function iframeContentAuto(){
	var cIframe = $(".content-iframe");
	if(cIframe && cIframe.length > 0){
		var userAgent = navigator.userAgent;
		var iframe = cIframe[0];
		var clientH = 0;
		//谷歌浏览器特殊处理
		if(userAgent.indexOf("Chrome") > -1){
			clientH = document.documentElement.clientHeight;
		}else{
			clientH = document.clientHeight;
		}
		var iframeHeight = clientH - 60 - 44 - 20;
		cIframe.css("height",iframeHeight);
	}
}
function initMenu(){
	$(".layui-nav-child dd a").click(function(){
		var murl = $(this).attr("menu-url");
		if(murl){
			$(".content-iframe").attr("src",murl);
		}
	});
	$(".layui-nav-item a").click(function(){
		var murl = $(this).attr("menu-url");
		if(murl){
			$(".content-iframe").attr("src",murl);
		}
	});
}
$(function(){
	iframeContentAuto();
	initMenu();
});